﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.WindowsAzure.StorageClient;

namespace LCA.Community.DAL.Model
{
    /// <summary>
    /// This class represents the relationship of a voluteer with a user
    /// 
    /// RowKey = ID of the relationship
    /// PartitionKey = ID of the helped user
    /// </summary>
    public class HelpRelationship : BasicDataModel
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="HelpRelationship"/> class.
        /// </summary>
        public HelpRelationship()
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="HelpRelationship"/> class.
        /// </summary>
        /// <param name="volunteer">The volunteer.</param>
        /// <param name="user">The user.</param>
        public HelpRelationship(string volunteer, string user)
        {
            RowKey = Guid.NewGuid().ToString();
            PartitionKey = user;
            Volunteer = volunteer;
        }

        /// <summary>
        /// Gets or sets the user.
        /// </summary>
        /// <value>The user.</value>
        public string User 
        {
            get
            {
                return PartitionKey;
            }
            set
            {
                PartitionKey = value;
            }
        }
        /// <summary>
        /// Gets or sets the volunteer.
        /// </summary>
        /// <value>The volunteer.</value>
        public string Volunteer { get; set; }
    }
}
